package com.hxzy.module.merchant.api.merchant;

import com.hxzy.framework.common.resp.R;
import com.hxzy.module.merchant.api.enums.ApiConstants;
import com.hxzy.module.merchant.api.fallback.MerchantFeignApiFallbackFactory;
import com.hxzy.module.merchant.api.merchant.resp.MerchantResp;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author wy
 * @Description 商户远程访问的API
 * @Date 2024/1/26 15:12
 * @Version 1.0
 */
@FeignClient(name = ApiConstants.SERVER_NAME,fallbackFactory = MerchantFeignApiFallbackFactory.class)
public interface MerchantFeignApi {


    @Operation(summary="获取商户详情")
    @GetMapping("/merchant/detail")
    R<MerchantResp> getMerchantDetail();

    /**
     * 根据商户ID查询
     * @param id
     * @return
     */
    @GetMapping(value = "/merchant/{id}")
    R<MerchantResp> findMerchantById(@PathVariable(value = "id") Long id);


}
